import request from '@/utils/request'
// 用户登录管理后台
export function login(data) {
  // const data = {
  //   password: encrypt(val.password),
  //   username: val.username
  // }
  return request({
    url: '/shoes-seller-manager/auth/login',
    method: 'post',
    data,
    hideError: true
  })
}
// 用户登录管理后台后获取菜单列表
export function getInfo(token) {
  return request({
    url: '/menu/myMenuList',
    method: 'get'
  })
}
// 用户登出管理后台
export function logout() {
  return request({
    url: '/shoes-seller-manager/auth/logout',
    method: 'Delete'
  })
}
// 用户修改管理后台登录密码
export function updatePersonal(data) {
  // const data = {
  //   oldPassword: encrypt(val.oldPassword),
  //   newPassword: encrypt(val.newPassword),
  //   newPasswordAgain: encrypt(val.newPasswordAgain),
  //   type: val.type
  // }
  return request({
    url: '/shoes-seller-manager/personInfo/update',
    method: 'post',
    data
  })
}

export function getCaptchaId(data) {
  return request({
    // url: "shoes-seller-manager/personInfo/get",
    // method: "post",
    data
  })
}
